<?php
// <copyright file="AuthenticationType.cs" company="NQtec">
// Copyright (c) 2008, 2009 All Right Reserved, http://www.dqer.com/
// Copyright (c) 2008, 2009 All Right Reserved, http://www.nqtec.com/
//
// This source is part of the DQER library that released under the LGPL.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Victor Gatkov</author>
// <email>v.gatkov@nqtec.com</email>
// <email>info@dqer.com</email>
// <date>2008-09-11</date>
// <summary>Contains a base, abstract class for an AuthorisationPolicyProvider</summary>

define('PGID','style');           // set page name as PaGeID
define('PGTP','style');         // set page type as PaGeTyPe render/form/com/etc..
define('ROOT_PATH','../../');        // may need to change path to site root from here
define('SRC_PATH',ROOT_PATH.'_');
define('IN_DQER_003311',true);


define('HDR_CONTYP','text/css');
define('MOD_RECON',true); // use this to rearange incl mods
$mod_s['active'] = array('php','pgdt','style','hdr'); //mysql

define ('DEBUG_LEVEL', 0); //0=production, 1=php errors, 2=php+engine raports

require_once(SRC_PATH."/index.php");

// header("Expires: ".gmdate("D, d M Y H:i:s", (time()+900)) . " Z");


 $fc                    = 'styles';

 $css="";

    for($i=0;$i<count($mod_s['styles']);$i++) {
       $file_css  = MODULES_PATH."/".$mod_s[$fc][$i]."/".$mod_s[$fc][$i].".css";
       $file_conf = MODULES_PATH."/".$mod_s[$fc][$i]."/css.php";
       if(file_exists($file_conf)) require_once($file_conf);
       $css.=load($file_css);
//echo $file_css."<br />";
    }

    for($i=0;$i<sizeof($constants);$i++) {
	$css=preg_replace('/\\$'.$constants[$i][0].'/',$constants[$i][1],$css);
    }

 echo $css;

 function load($filelocation) {
	if(file_exists($filelocation)){
		$newfile = fopen($filelocation,"r");
		$file_content = fread($newfile, filesize($filelocation));
		fclose($newfile);
		return $file_content;
	}
 }
?>
